<template>
	<div class="main">
		<div class="nava"></div>
			<ul class="bottom">
				<li>
					<router-link to="/"  >
						<img src="../../assets/img/nva1-1.png" v-if="page==1"/>
						<img src="../../assets/img/nva1.png" v-else/>
						<h3>首页</h3>
					</router-link>
				</li>
				<li>
					<router-link to="/order">
						<img src="../../assets/img/nva2-2.png" v-if="page==2" />
						<img src="../../assets/img/nva2.png" v-else/>
						<h3>订单</h3>
					</router-link>
				</li>
				<li>
					<router-link to="/user" >
						<img src="../../assets/img/nva3-3.png" v-if="page==3"/>
						<img src="../../assets/img/nva3.png" v-else/>
						<h3>个人中心</h3>
					</router-link>
				</li>
			</ul>
	</div>
</template>

<script>
	export default{
		name:'BottomNav',
		props:['pages'],
		data() {
			return{
				page:this.pages,
			}
		},
	}
</script>

<style scoped>
	a{
		text-decoration: none;
		color: black;
	}
	.nava{
		width: 100%;
		height: 1.8rem;
		background-color: white;
	}
	.bottom{
		position: fixed;
		bottom: 0;
		left: 0;
		width: 100%;
		background-color: white;
		height: 1.3rem;
		z-index: 100;
		display: flex;
		justify-content: center;
		align-items: center;
	}
	.bottom li{
		width: 30%;
		text-align: center;
		height: 1rem;
	}
	.bottom li img{
		width: 0.6rem;
		height: 0.6rem;
	}
	.bottom li h3{
		line-height: 0.5rem;
	}
</style>
